{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
<!------------------游记文章-------------------->
<div id="note_list">
	<div class="banner">
		<h2>游记文章</h2>
		<p>记录精彩瞬间，保存美好回忆</p>
	</div>
	<div class="tag">
		<div class="cw1200">
			<a {% if diary_type == 'new' %}class="cur"{% endif %} href="{% url 'diarys:all' 'new' %}">最新游记</a><span></span>
			<a {% if diary_type == 'hot' %}class="cur"{% endif %} href="{% url 'diarys:all' 'hot' %}">发现精彩</a><span></span>
			<a href="{% url 'diarys:getdiaray' 0 %}">我要写游记</a>
		</div>
	</div>
	<div class="con">
		<div class="cw1200">
			<ul class="am-avg-sm-2">

                {% for diary in diarys %}
                <li>
					<div class="box">
						<div class="pic">
							<div class="cover">
                                <a href="{% url 'diarys:details' diary.id %}">
                                    <img style="width: 100%;height: 100%" class="scale-effect " src="{{ MEDIA_URL }}{{ diary.image }}"/>
                                </a>
                            </div>
							<div class="head"><img src="{{ MEDIA_URL }}{{ diary.user.portrait }}"/></div>
						</div>
						<div class="meta">
							<p><a href="{% url 'diarys:details' diary.id %}">{{ diary.title }}</a></p>
							<span>{{ diary.add_times|date:"Y/m/d"  }} 作者：{{ diary.user.nickname }}<label>
                                <img src="{% static 'images/state_icon1.png' %}"/>{{ diary.checknum }}</label><label>
                                <img src="{% static 'images/state_icon2.png' %}"/>{{ diary.commentsnum }}</label>
                            </span>
						</div>
					</div>
				</li>
                {% endfor %}
				<div class="clear"></div>
			</ul>
		</div>
	</div>
</div>
{% endblock %}